# npu
file(GLOB KERNEL_FILES
    ${CMAKE_SOURCE_DIR}/*.cpp
)
set_source_files_properties(${KERNEL_FILES} PROPERTIES LANGUAGE CCE)

add_library(ascendc_kernels SHARED
    ${KERNEL_FILES}
)

target_compile_definitions(ascendc_kernels PRIVATE
    TILING_KEY_VAR=0
)

target_compile_options(ascendc_kernels PRIVATE
    -O2
    -std=c++17
)

set_target_properties(ascendc_kernels PROPERTIES
    OUTPUT_NAME ascendc_kernels
    LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/libs
)

install(TARGETS ascendc_kernels
    LIBRARY DESTINATION ${PROJECT_SOURCE_DIR}
)